#pseudocode

def selection_sorting(a):
    len_a = len(a)
    for i in range(len_a - 1, -1, -1):
        max_one = a[i]
        index_to_ex = i
        for j in range(0, i+1):
            if a[j] > max_one:
                index_to_ex = j
                max_one = a[j]
        temp = a[i]
        a[i] = a[index_to_ex]
        a[index_to_ex] = temp

a = list(map(int, input().split()))
print(a)
selection_sorting(a)
print(a)


